<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Forms | Amanda Admin Template</title>
		<link rel="stylesheet" href="../css/style.default.css" type="text/css" />
		
		<script type="text/javascript" src="../js/plugins/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.cookie.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.uniform.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.validate.min.js"></script>
		<script type="text/javascript" src="../js/plugins/jquery.tagsinput.min.js"></script>
		<script type="text/javascript" src="../js/plugins/charCount.js"></script>
		<script type="text/javascript" src="../js/plugins/ui.spinner.min.js"></script>
		<script type="text/javascript" src="../js/plugins/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="../js/custom/general.js"></script>
		<script type="text/javascript" src="../js/custom/forms.js"></script>
		
		<script type="text/javascript" src="../js/baseServerLink.js"></script>

		<script type="text/javascript">
			function addLine(id, username, email, app_num, link_num){
				/*
				<tr>
					<td> 李四 </td>
					<td>789@qq.com</td>
					<td>8</td>
					<td>9</td>
					<td><a href="#" class="btn btn2 btn_archive"><span>操作</span></a></td>
				</tr>
				*/
			   //展示信息的行
				$tr = jQuery("<tr class=\"vartr\"></tr>");
				$tr.append(jQuery("<td>"+username+"</td>"));
				$tr.append(jQuery("<td>"+email+"</td>"));
				$tr.append(jQuery("<td>"+app_num+"</td>"));
				$tr.append(jQuery("<td>"+link_num+"</td>"));
				
				$opi = jQuery('<a href="#" class="btn btn2 btn_archive"><span>操作</span></a>');
				$opi.click(function(){
					eval("jQuery('#userid_'+id).show();");
				})
				$tr.append(jQuery("<td></td>").append($opi));
				
				//详细信息的行
				$frametr = jQuery("<tr class=\"vartr\"></tr>");
				//设置此行id,用于隐藏和显示
				$frametr.attr("id", "userid_"+id);
				$frametr.hide();
				$closeButton = jQuery("<button>关闭</buttton>");
				$closeButton.click(function(){
					eval("jQuery('#userid_'+id).hide();");
				})
				//加入关闭按钮
				$frametr.append(jQuery("<td></td>").append($closeButton));
				
				$iframe =jQuery("<iframe></iframe>");
				//加入iframe
				$frametr.append(jQuery("<td colspan='4'></td>").append($iframe));
				
				jQuery("#my_tbody").append($tr);
				jQuery("#my_tbody").append($frametr);
			}
			
			jQuery(function(){
				//////////////////////////////////////debug//////////////////////////////////
				return;
				//////////////////////////////////////debug//////////////////////////////////
				$vartr = jQuery(".vartr");
				for (var i = 0; i < $vartr.length; i++) {
					$vartr.remove();
				}
				
				jQuery.ajax({
					url:baseServerLink+'/UserServlet',
					data:{
						'mode':44
					},
					success:function(message){
						console.log(message);
						alert(message);
						if(message[0] != '['){
							window.location.href=baseServerLink+"/index.jsp";
						}
						else{
							message = eval(message);
							
							jQuery("#id_user_num").text("共查询到 "+message.length+" 条记录");
							for(line in message){
								my_line = message[line];
								addLine(
										my_line['user_id'],
										my_line['user_name'],
										my_line['user_email'],
										my_line['app_num'],
										my_line['key_num']
								);
							}
						}
					},
					error:function(message){
						console.log(message)
					}
				})
			})
		</script>

	<style type="text/css">
		.my_green_button{
			background-color: #95f04b;
			border: 0;
			border-radius:20px;
			-moz-border-radius:20px; /* 老的 Firefox */
			font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
			font-weight: bold;
			color: #5c8f30;
			border: 1px solid #6eac3a;
		}
	</style>
		
	</head>

	<body class="withvernav">

		<div class="bodywrapper">
			<iframe style="background-color: #485b79;" src="top.html" width="100%" height="160px"></iframe>
			<!--header-->
			

			<div class="vernav2 iconmenu">
				<ul>
					<li class="current"><a href="#formsub" class="editor">用户管理</a>
						<span class="arrow"></span>
						<ul id="formsub">
							<li ><a id="left_mamage_all_user" href="">管理系统中所有用户</a></li>
						</ul>
						
						<ul id="formsub">
							<li><a id="left_mamage_my_user" href="">管理我的用户</a></li>
						</ul>
					</li>
					
				</ul>
				<a class="togglemenu"></a>
				<br /><br />
			</div>
			<!--leftmenu-->

			<div class="centercontent">
				<div class="pageheader">
				    <h1 class="pagetitle">用户和服务</h1>
				    <span class="pagedesc">Users and Services</span>
				    
				    <ul class="hornav">
				        <li class="current"><a href="#tag1">管理系统中所有用户</a></li>
						 <li ><a href="#tag2">我的用户和服务</a></li>
				       
				    </ul>
					
				</div><!--pageheader-->
				<div id="contentwrapper" class="contentwrapper">
					
					<div id="tag1" class="subcontent">
						<a href="#" class="btn btn_blue btn_flag"><span id="id_user_num">共查询到  条记录</span></a>
						<button type="button" class="my_green_button"><span  style="line-height: 30px;"><span style="color: white; font-size: larger;">(+)</span> 新增新的用户</span></button>
						
						
						<br/>
						<br/>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
								<col class="con1" />
								<col class="con1" />
							</colgroup>
							<thead>
								<tr>
									<th class="head0" style="text-align: center;">用户名</th>
									<th class="head1" style="text-align: center;">邮箱</th>
									<th class="head1" style="text-align: center;">应用数</th>
									<th class="head1" style="text-align: center;">连接数目</th>
									<th class="head1" style="text-align: center;">操作</th>
								</tr>
							</thead>
							<tbody id="my_tbody">
								<tr class="vartr">
									<td style="text-align: center;"> 张三 </td>
									<td>123456@qq.com</td>
									<td>2</td>
									<td>8</td>
									<td><a href="#" class="btn btn2 btn_archive"><span>操作</span></a></td>
								</tr>
								
								<tr class="vartr">
									<td style="text-align: center;"> 李四 </td>
									<td>789@qq.com</td>
									<td>8</td>
									<td>9</td>
									<td><a href="#" class="btn btn2 btn_archive"><span>操作</span></a></td>
								</tr>
							</tbody>
						</table>
					</div>
					
					<div id="tag2" class="subcontent" style="display: none">
						<div class="contenttitle2">
							<h3>信息概览</h3>
						</div>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
								<col class="con1" />
								<col class="con1" />
							</colgroup>
							<thead>
								<tr>
									<th class="head0" style="text-align: center;">用户名</th>
									<th class="head1" style="text-align: center;">邮箱</th>
									<th class="head1" style="text-align: center;">应用数</th>
									<th class="head1" style="text-align: center;">连接数目</th>
									<th class="head1" style="text-align: center;">操作</th>
								</tr>
							</thead>
							<tbody>
								
								<tr>
									<td style="text-align: center;"> 李四 </td>
									<td>789@qq.com</td>
									<td>8</td>
									<td>9</td>
									<td><a href="#" class="btn btn2 btn_archive"><span>操作</span></a></td>
								</tr>
								
								<tr>
									<td colspan="5" style="text-align: center;"> 李四 </td>
									
								</tr>
							</tbody>
						</table>
						
						<div class="contenttitle2">
							<h3>测试操作</h3>
						</div>
						<h3>人脸检测</h3>
						<br/>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
							</colgroup>
							<thead>
								<tr>
									<th class="head1" style="background-color: #f7f7f7;background-image: linear-gradient(to right,#aaaaff , #f7f7f7);">人脸检测-HTML-ajax方式</th>
								</tr>
							</thead>
							<tbody>
								
								<tr>
									<td> <iframe src="../test.html" width="" height=""></iframe></td>
								</tr>
							</tbody>
						</table>
						
						<br/>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
							</colgroup>
							<thead>
								<tr>
									<th class="head1" style="background-color: #f7f7f7;background-image: linear-gradient(to right,#aaaaff , #f7f7f7);">人脸检测-HTML-Servlet请求包含</th>
								</tr>
							</thead>
							<tbody>
								
								<tr>
									<td> <iframe src="../test.html" width="" height=""></iframe></td>
								</tr>
							</tbody>
						</table>
						
						<br/>
						<h3>人脸识别</h3>
						<br/>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
							</colgroup>
							<thead>
								<tr>
									<th class="head1" style="background-color: #f7f7f7;background-image: linear-gradient(to right,#ff5500 , #f7f7f7);">人脸识别-HTML-ajax方式</th>
								</tr>
							</thead>
							<tbody>
								
								<tr>
									<td> <iframe src="../test.html" width="" height=""></iframe></td>
								</tr>
							</tbody>
						</table>
						<br/>
						<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="text-align: center;">
							<colgroup>
								<col class="con0" />
							</colgroup>
							<thead>
								<tr>
									<th class="head1" style="background-color: #f7f7f7;background-image: linear-gradient(to right,#ff5500 , #f7f7f7);">人脸识别-HTML-Servlet请求包含</th>
								</tr>
							</thead>
							<tbody>
								
								<tr>
									<td> <iframe src="../test.html" width="" height=""></iframe></td>
								</tr>
							</tbody>
						</table>
						
					</div>
				</div>
			</div>
			<!---->
		</div>
		<!--bodywrapper-->

	</body>
</html>
